package com.example.community.dao;

import com.example.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    User selectById(int id);

    User selectByName(String username);

    User selectByEmail(String email);

    int insertUser(User user);

    int updateStatus(int id, int status);

    int updateHeader(int id, String headerUrl);

    int updatePassword(int id, String password);

    int selectAllUser();

    List<User> findAllUser(int offset,int limit);

    List<User> findSomeUser(int offset,int limit,String keyword);

    List<User> findAllBlackUser(int offset,int limit);

    List<User> findAdminOrModerator(int offset,int limit,int type);

    int totalSomeUser(String keyword);

}
